#include<stdio.h>

int main(void)
{
    int n;
    int ints1[100], ints2[100];
    int *p;
    int *q;
    int *temp;

    scanf("%d",&n);

    q = ints1;
    temp = ints1;
    p = ints2;
    ints1[0] = 1;
    ints1[1] = 1;
    ints1[2] = 1;
    ints2[0] = 1;
    ints2[1] = 1;
    ints2[2] = 1;

    printf("1\n");

    for (int i = 1; i < n; i++)
    {
        for (int j = 0; j < i + 1; j++)
        {
            if (j == 0)
            {
                *q = 1;
            }
            else if (j == i)
            {
                *(q + j) = 1;
            }
            else 
            {
                *(q + j) = *(p + j - 1) + *(p + j);
            }   
        }
        for (int j = 0; j < i + 1; j++)
        {
            printf("%d ",*(q + j));
        }

        printf("\n");
        temp = q;
        q = p; 
        p = temp;
    }
}
